Problem: Let $y=x^{^{ \tan(x)}}$. Find $\dfrac{dy}{dx}$. Choose 1 answer: Choose 1 answer: (Choice A) A $x^{^{ \tan(x)}}\left(\sec^2(x)\ln(x)+\dfrac{\tan(x)}{x}\right)$ (Choice B) B $x\sec^2(x)+\tan(x)$ (Choice C) C $\tan(x)\cdot x^{^{ \tan(x)-1}}$ (Choice D) D $x^{^{ \tan(x)}}\left(\dfrac{\sec^2(x)}{x}\right)$
Explanation: $x^{^{ \tan(x)}}$ is an exponential function where the variable is both in the base and in the exponent. This kind of function is called a composite exponential function. The most common way for differentiating this kind of function is with logarithmic differentiation. In logarithmic differentiation, we take the equation and put both sides of it within a $\ln(x)$ function, and then differentiate both sides. The following identity (where $u$ is any function) comes in useful when using logarithmic differentiation: $\dfrac{d}{dx}\ln(u(x))=\dfrac{u'(x)}{u(x)}$ [Why is this identity true?] Let's differentiate! $\begin{aligned} y&=x^{^{ \tan(x)}} \\\\ \ln(y)&=\ln\left(x^{^{ \tan(x)}}\right)&&\gray{\ln()\text{ both sides}} \\\\ \ln(y)&=\tan(x)\ln(x)&&\gray{\text{Logarithm properties}} \\\\ \dfrac{d}{dx}\ln(y)&=\dfrac{d}{dx}(\tan(x)\ln(x))&&\gray{\text{Diff. both sides}} \\\\ \dfrac{\left(\dfrac{dy}{dx}\right)}{y}&=\sec^2(x)\ln(x)+\tan(x)\cdot \dfrac{1}{x} \\\\ \dfrac{dy}{dx}&=y\left(\sec^2(x)\ln(x)+\dfrac{\tan(x)}{x}\right) \end{aligned}$ Now we can replace $y$ with its formula, and we got the formula for $\dfrac{dy}{dx}$. In conclusion, $\dfrac{dy}{dx}=x^{^{ \tan(x)}}\left(\sec^2(x)\ln(x)+\dfrac{\tan(x)}{x}\right)$.